package site.marqstree.latte.ui.refresh;

import java.util.ArrayList;
import java.util.List;

import site.marqstree.latte.ui.recycler.MultipleItemEntity;

/*
 * 项目名: EleCommerce
 * 包名: site.marqstree.latte.ui.refresh
 * 文件名: PagingBean
 * 创建者: marqstree
 * 创建时间: 2020/1/27 9:16
 * 描述: TODO
 */
public final class PagingBean {
    //最后一页的页码
    private int mLastPageIndex = 0;
    //记录Item总数
    private int mTotalItemCount = 0;

    //添加列
    //累加新增行数
    //累加页码
    public PagingBean addItem(int itemCountCurrentPage) {
        //累加Item数量
        this.mTotalItemCount += itemCountCurrentPage;
        this.mLastPageIndex++;
        return this;
    }

    //获得Item总数
    public int getItemCount(){
        return mTotalItemCount;
    }

    //重置页码
    //重置行数为0
    public void resetFirstPageIndex() {
        mLastPageIndex = 0;
        mTotalItemCount = 0;
    }

    //获取页码号
    public int getLastPageIndex() {
        return mLastPageIndex;
    }
}
